(0) Obligation:

Clauses:

ap1(nil, X, X).
ap1(cons(H, X), Y, cons(H, Z)) :- ap1(X, Y, Z).
ap2(nil, X, X).
ap2(cons(H, X), Y, cons(H, Z)) :- ap2(X, Y, Z).
perm(nil, nil).
perm(Xs, cons(X, Ys)) :- ','(ap1(X1s, cons(X, X2s), Xs), ','(ap2(X1s, X2s, Zs), perm(Zs, Ys))).

Query: perm(g,a)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

ap1A(nil, T68, T69, cons(T68, T69)).
ap1A(cons(T77, X107), T79, X108, cons(T77, T78)) :- ap1A(X107, T79, X108, T78).
ap2B(nil, T102, T102).
ap2B(cons(T109, T110), T111, cons(T109, X156)) :- ap2B(T110, T111, X156).
ap2C(T37, T37).
ap2D(T93, T94, T95, cons(T93, X134)) :- ap2B(T94, T95, X134).
permE(nil, nil).
permE(cons(T27, T28), cons(T27, T29)) :- ap2C(T28, X27).
permE(cons(T27, T28), cons(T27, T29)) :- ','(ap2C(T28, T31), permE(T31, T29)).
permE(cons(T45, T46), cons(T47, T48)) :- ap1A(X68, T47, X69, T46).
permE(cons(T45, T46), cons(T47, T55)) :- ','(ap1A(T53, T47, T54, T46), ap2D(T45, T53, T54, X27)).
permE(cons(T45, T46), cons(T47, T55)) :- ','(ap1A(T53, T47, T54, T46), ','(ap2D(T45, T53, T54, T84), permE(T84, T55))).

Query: permE(g,a)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
permE_in: (b,f)
ap1A_in: (f,f,f,b)
ap2D_in: (b,b,b,f)
ap2B_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

permE_in_ga(nil, nil) → permE_out_ga(nil, nil)
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U4_ga(T27, T28, T29, ap2C_in_ga(T28, X27))
ap2C_in_ga(T37, T37) → ap2C_out_ga(T37, T37)
U4_ga(T27, T28, T29, ap2C_out_ga(T28, X27)) → permE_out_ga(cons(T27, T28), cons(T27, T29))
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U5_ga(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_ga(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_ga(T27, T28, T29, permE_in_ga(T31, T29))
permE_in_ga(cons(T45, T46), cons(T47, T48)) → U7_ga(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
ap1A_in_aaag(nil, T68, T69, cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69, cons(T68, T69))
ap1A_in_aaag(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_aaag(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
U1_aaag(T77, X107, T79, X108, T78, ap1A_out_aaag(X107, T79, X108, T78)) → ap1A_out_aaag(cons(T77, X107), T79, X108, cons(T77, T78))
U7_ga(T45, T46, T47, T48, ap1A_out_aaag(X68, T47, X69, T46)) → permE_out_ga(cons(T45, T46), cons(T47, T48))
permE_in_ga(cons(T45, T46), cons(T47, T55)) → U8_ga(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
ap2D_in_ggga(T93, T94, T95, cons(T93, X134)) → U3_ggga(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
ap2B_in_gga(nil, T102, T102) → ap2B_out_gga(nil, T102, T102)
ap2B_in_gga(cons(T109, T110), T111, cons(T109, X156)) → U2_gga(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
U2_gga(T109, T110, T111, X156, ap2B_out_gga(T110, T111, X156)) → ap2B_out_gga(cons(T109, T110), T111, cons(T109, X156))
U3_ggga(T93, T94, T95, X134, ap2B_out_gga(T94, T95, X134)) → ap2D_out_ggga(T93, T94, T95, cons(T93, X134))
U9_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, X27)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_ga(T45, T46, T47, T55, permE_in_ga(T84, T55))
U11_ga(T45, T46, T47, T55, permE_out_ga(T84, T55)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U6_ga(T27, T28, T29, permE_out_ga(T31, T29)) → permE_out_ga(cons(T27, T28), cons(T27, T29))

The argument filtering Pi contains the following mapping:
permE_in_ga(x1, x2)  =  permE_in_ga(x1)
nil  =  nil
permE_out_ga(x1, x2)  =  permE_out_ga
cons(x1, x2)  =  cons(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
ap2C_in_ga(x1, x2)  =  ap2C_in_ga(x1)
ap2C_out_ga(x1, x2)  =  ap2C_out_ga(x2)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
ap1A_in_aaag(x1, x2, x3, x4)  =  ap1A_in_aaag(x4)
ap1A_out_aaag(x1, x2, x3, x4)  =  ap1A_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U8_ga(x1, x2, x3, x4, x5)  =  U8_ga(x1, x5)
U9_ga(x1, x2, x3, x4, x5)  =  U9_ga(x5)
ap2D_in_ggga(x1, x2, x3, x4)  =  ap2D_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x5)
ap2B_in_gga(x1, x2, x3)  =  ap2B_in_gga(x1, x2)
ap2B_out_gga(x1, x2, x3)  =  ap2B_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
ap2D_out_ggga(x1, x2, x3, x4)  =  ap2D_out_ggga(x4)
U10_ga(x1, x2, x3, x4, x5)  =  U10_ga(x5)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

permE_in_ga(nil, nil) → permE_out_ga(nil, nil)
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U4_ga(T27, T28, T29, ap2C_in_ga(T28, X27))
ap2C_in_ga(T37, T37) → ap2C_out_ga(T37, T37)
U4_ga(T27, T28, T29, ap2C_out_ga(T28, X27)) → permE_out_ga(cons(T27, T28), cons(T27, T29))
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U5_ga(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_ga(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_ga(T27, T28, T29, permE_in_ga(T31, T29))
permE_in_ga(cons(T45, T46), cons(T47, T48)) → U7_ga(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
ap1A_in_aaag(nil, T68, T69, cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69, cons(T68, T69))
ap1A_in_aaag(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_aaag(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
U1_aaag(T77, X107, T79, X108, T78, ap1A_out_aaag(X107, T79, X108, T78)) → ap1A_out_aaag(cons(T77, X107), T79, X108, cons(T77, T78))
U7_ga(T45, T46, T47, T48, ap1A_out_aaag(X68, T47, X69, T46)) → permE_out_ga(cons(T45, T46), cons(T47, T48))
permE_in_ga(cons(T45, T46), cons(T47, T55)) → U8_ga(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
ap2D_in_ggga(T93, T94, T95, cons(T93, X134)) → U3_ggga(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
ap2B_in_gga(nil, T102, T102) → ap2B_out_gga(nil, T102, T102)
ap2B_in_gga(cons(T109, T110), T111, cons(T109, X156)) → U2_gga(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
U2_gga(T109, T110, T111, X156, ap2B_out_gga(T110, T111, X156)) → ap2B_out_gga(cons(T109, T110), T111, cons(T109, X156))
U3_ggga(T93, T94, T95, X134, ap2B_out_gga(T94, T95, X134)) → ap2D_out_ggga(T93, T94, T95, cons(T93, X134))
U9_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, X27)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_ga(T45, T46, T47, T55, permE_in_ga(T84, T55))
U11_ga(T45, T46, T47, T55, permE_out_ga(T84, T55)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U6_ga(T27, T28, T29, permE_out_ga(T31, T29)) → permE_out_ga(cons(T27, T28), cons(T27, T29))

The argument filtering Pi contains the following mapping:
permE_in_ga(x1, x2)  =  permE_in_ga(x1)
nil  =  nil
permE_out_ga(x1, x2)  =  permE_out_ga
cons(x1, x2)  =  cons(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
ap2C_in_ga(x1, x2)  =  ap2C_in_ga(x1)
ap2C_out_ga(x1, x2)  =  ap2C_out_ga(x2)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
ap1A_in_aaag(x1, x2, x3, x4)  =  ap1A_in_aaag(x4)
ap1A_out_aaag(x1, x2, x3, x4)  =  ap1A_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U8_ga(x1, x2, x3, x4, x5)  =  U8_ga(x1, x5)
U9_ga(x1, x2, x3, x4, x5)  =  U9_ga(x5)
ap2D_in_ggga(x1, x2, x3, x4)  =  ap2D_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x5)
ap2B_in_gga(x1, x2, x3)  =  ap2B_in_gga(x1, x2)
ap2B_out_gga(x1, x2, x3)  =  ap2B_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
ap2D_out_ggga(x1, x2, x3, x4)  =  ap2D_out_ggga(x4)
U10_ga(x1, x2, x3, x4, x5)  =  U10_ga(x5)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PERME_IN_GA(cons(T27, T28), cons(T27, T29)) → U4_GA(T27, T28, T29, ap2C_in_ga(T28, X27))
PERME_IN_GA(cons(T27, T28), cons(T27, T29)) → AP2C_IN_GA(T28, X27)
PERME_IN_GA(cons(T27, T28), cons(T27, T29)) → U5_GA(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_GA(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_GA(T27, T28, T29, permE_in_ga(T31, T29))
U5_GA(T27, T28, T29, ap2C_out_ga(T28, T31)) → PERME_IN_GA(T31, T29)
PERME_IN_GA(cons(T45, T46), cons(T47, T48)) → U7_GA(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
PERME_IN_GA(cons(T45, T46), cons(T47, T48)) → AP1A_IN_AAAG(X68, T47, X69, T46)
AP1A_IN_AAAG(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_AAAG(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
AP1A_IN_AAAG(cons(T77, X107), T79, X108, cons(T77, T78)) → AP1A_IN_AAAG(X107, T79, X108, T78)
PERME_IN_GA(cons(T45, T46), cons(T47, T55)) → U8_GA(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_GA(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_GA(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
U8_GA(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → AP2D_IN_GGGA(T45, T53, T54, X27)
AP2D_IN_GGGA(T93, T94, T95, cons(T93, X134)) → U3_GGGA(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
AP2D_IN_GGGA(T93, T94, T95, cons(T93, X134)) → AP2B_IN_GGA(T94, T95, X134)
AP2B_IN_GGA(cons(T109, T110), T111, cons(T109, X156)) → U2_GGA(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
AP2B_IN_GGA(cons(T109, T110), T111, cons(T109, X156)) → AP2B_IN_GGA(T110, T111, X156)
U8_GA(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_GA(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_GA(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_GA(T45, T46, T47, T55, permE_in_ga(T84, T55))
U10_GA(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → PERME_IN_GA(T84, T55)

The TRS R consists of the following rules:

permE_in_ga(nil, nil) → permE_out_ga(nil, nil)
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U4_ga(T27, T28, T29, ap2C_in_ga(T28, X27))
ap2C_in_ga(T37, T37) → ap2C_out_ga(T37, T37)
U4_ga(T27, T28, T29, ap2C_out_ga(T28, X27)) → permE_out_ga(cons(T27, T28), cons(T27, T29))
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U5_ga(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_ga(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_ga(T27, T28, T29, permE_in_ga(T31, T29))
permE_in_ga(cons(T45, T46), cons(T47, T48)) → U7_ga(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
ap1A_in_aaag(nil, T68, T69, cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69, cons(T68, T69))
ap1A_in_aaag(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_aaag(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
U1_aaag(T77, X107, T79, X108, T78, ap1A_out_aaag(X107, T79, X108, T78)) → ap1A_out_aaag(cons(T77, X107), T79, X108, cons(T77, T78))
U7_ga(T45, T46, T47, T48, ap1A_out_aaag(X68, T47, X69, T46)) → permE_out_ga(cons(T45, T46), cons(T47, T48))
permE_in_ga(cons(T45, T46), cons(T47, T55)) → U8_ga(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
ap2D_in_ggga(T93, T94, T95, cons(T93, X134)) → U3_ggga(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
ap2B_in_gga(nil, T102, T102) → ap2B_out_gga(nil, T102, T102)
ap2B_in_gga(cons(T109, T110), T111, cons(T109, X156)) → U2_gga(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
U2_gga(T109, T110, T111, X156, ap2B_out_gga(T110, T111, X156)) → ap2B_out_gga(cons(T109, T110), T111, cons(T109, X156))
U3_ggga(T93, T94, T95, X134, ap2B_out_gga(T94, T95, X134)) → ap2D_out_ggga(T93, T94, T95, cons(T93, X134))
U9_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, X27)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_ga(T45, T46, T47, T55, permE_in_ga(T84, T55))
U11_ga(T45, T46, T47, T55, permE_out_ga(T84, T55)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U6_ga(T27, T28, T29, permE_out_ga(T31, T29)) → permE_out_ga(cons(T27, T28), cons(T27, T29))

The argument filtering Pi contains the following mapping:
permE_in_ga(x1, x2)  =  permE_in_ga(x1)
nil  =  nil
permE_out_ga(x1, x2)  =  permE_out_ga
cons(x1, x2)  =  cons(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
ap2C_in_ga(x1, x2)  =  ap2C_in_ga(x1)
ap2C_out_ga(x1, x2)  =  ap2C_out_ga(x2)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
ap1A_in_aaag(x1, x2, x3, x4)  =  ap1A_in_aaag(x4)
ap1A_out_aaag(x1, x2, x3, x4)  =  ap1A_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U8_ga(x1, x2, x3, x4, x5)  =  U8_ga(x1, x5)
U9_ga(x1, x2, x3, x4, x5)  =  U9_ga(x5)
ap2D_in_ggga(x1, x2, x3, x4)  =  ap2D_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x5)
ap2B_in_gga(x1, x2, x3)  =  ap2B_in_gga(x1, x2)
ap2B_out_gga(x1, x2, x3)  =  ap2B_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
ap2D_out_ggga(x1, x2, x3, x4)  =  ap2D_out_ggga(x4)
U10_ga(x1, x2, x3, x4, x5)  =  U10_ga(x5)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
PERME_IN_GA(x1, x2)  =  PERME_IN_GA(x1)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
AP2C_IN_GA(x1, x2)  =  AP2C_IN_GA(x1)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)
U6_GA(x1, x2, x3, x4)  =  U6_GA(x4)
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x5)
AP1A_IN_AAAG(x1, x2, x3, x4)  =  AP1A_IN_AAAG(x4)
U1_AAAG(x1, x2, x3, x4, x5, x6)  =  U1_AAAG(x1, x6)
U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x5)
U9_GA(x1, x2, x3, x4, x5)  =  U9_GA(x5)
AP2D_IN_GGGA(x1, x2, x3, x4)  =  AP2D_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4, x5)  =  U3_GGGA(x1, x5)
AP2B_IN_GGA(x1, x2, x3)  =  AP2B_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4, x5)  =  U2_GGA(x1, x5)
U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x5)
U11_GA(x1, x2, x3, x4, x5)  =  U11_GA(x5)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PERME_IN_GA(cons(T27, T28), cons(T27, T29)) → U4_GA(T27, T28, T29, ap2C_in_ga(T28, X27))
PERME_IN_GA(cons(T27, T28), cons(T27, T29)) → AP2C_IN_GA(T28, X27)
PERME_IN_GA(cons(T27, T28), cons(T27, T29)) → U5_GA(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_GA(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_GA(T27, T28, T29, permE_in_ga(T31, T29))
U5_GA(T27, T28, T29, ap2C_out_ga(T28, T31)) → PERME_IN_GA(T31, T29)
PERME_IN_GA(cons(T45, T46), cons(T47, T48)) → U7_GA(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
PERME_IN_GA(cons(T45, T46), cons(T47, T48)) → AP1A_IN_AAAG(X68, T47, X69, T46)
AP1A_IN_AAAG(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_AAAG(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
AP1A_IN_AAAG(cons(T77, X107), T79, X108, cons(T77, T78)) → AP1A_IN_AAAG(X107, T79, X108, T78)
PERME_IN_GA(cons(T45, T46), cons(T47, T55)) → U8_GA(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_GA(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_GA(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
U8_GA(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → AP2D_IN_GGGA(T45, T53, T54, X27)
AP2D_IN_GGGA(T93, T94, T95, cons(T93, X134)) → U3_GGGA(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
AP2D_IN_GGGA(T93, T94, T95, cons(T93, X134)) → AP2B_IN_GGA(T94, T95, X134)
AP2B_IN_GGA(cons(T109, T110), T111, cons(T109, X156)) → U2_GGA(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
AP2B_IN_GGA(cons(T109, T110), T111, cons(T109, X156)) → AP2B_IN_GGA(T110, T111, X156)
U8_GA(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_GA(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_GA(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_GA(T45, T46, T47, T55, permE_in_ga(T84, T55))
U10_GA(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → PERME_IN_GA(T84, T55)

The TRS R consists of the following rules:

permE_in_ga(nil, nil) → permE_out_ga(nil, nil)
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U4_ga(T27, T28, T29, ap2C_in_ga(T28, X27))
ap2C_in_ga(T37, T37) → ap2C_out_ga(T37, T37)
U4_ga(T27, T28, T29, ap2C_out_ga(T28, X27)) → permE_out_ga(cons(T27, T28), cons(T27, T29))
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U5_ga(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_ga(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_ga(T27, T28, T29, permE_in_ga(T31, T29))
permE_in_ga(cons(T45, T46), cons(T47, T48)) → U7_ga(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
ap1A_in_aaag(nil, T68, T69, cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69, cons(T68, T69))
ap1A_in_aaag(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_aaag(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
U1_aaag(T77, X107, T79, X108, T78, ap1A_out_aaag(X107, T79, X108, T78)) → ap1A_out_aaag(cons(T77, X107), T79, X108, cons(T77, T78))
U7_ga(T45, T46, T47, T48, ap1A_out_aaag(X68, T47, X69, T46)) → permE_out_ga(cons(T45, T46), cons(T47, T48))
permE_in_ga(cons(T45, T46), cons(T47, T55)) → U8_ga(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
ap2D_in_ggga(T93, T94, T95, cons(T93, X134)) → U3_ggga(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
ap2B_in_gga(nil, T102, T102) → ap2B_out_gga(nil, T102, T102)
ap2B_in_gga(cons(T109, T110), T111, cons(T109, X156)) → U2_gga(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
U2_gga(T109, T110, T111, X156, ap2B_out_gga(T110, T111, X156)) → ap2B_out_gga(cons(T109, T110), T111, cons(T109, X156))
U3_ggga(T93, T94, T95, X134, ap2B_out_gga(T94, T95, X134)) → ap2D_out_ggga(T93, T94, T95, cons(T93, X134))
U9_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, X27)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_ga(T45, T46, T47, T55, permE_in_ga(T84, T55))
U11_ga(T45, T46, T47, T55, permE_out_ga(T84, T55)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U6_ga(T27, T28, T29, permE_out_ga(T31, T29)) → permE_out_ga(cons(T27, T28), cons(T27, T29))

The argument filtering Pi contains the following mapping:
permE_in_ga(x1, x2)  =  permE_in_ga(x1)
nil  =  nil
permE_out_ga(x1, x2)  =  permE_out_ga
cons(x1, x2)  =  cons(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
ap2C_in_ga(x1, x2)  =  ap2C_in_ga(x1)
ap2C_out_ga(x1, x2)  =  ap2C_out_ga(x2)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
ap1A_in_aaag(x1, x2, x3, x4)  =  ap1A_in_aaag(x4)
ap1A_out_aaag(x1, x2, x3, x4)  =  ap1A_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U8_ga(x1, x2, x3, x4, x5)  =  U8_ga(x1, x5)
U9_ga(x1, x2, x3, x4, x5)  =  U9_ga(x5)
ap2D_in_ggga(x1, x2, x3, x4)  =  ap2D_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x5)
ap2B_in_gga(x1, x2, x3)  =  ap2B_in_gga(x1, x2)
ap2B_out_gga(x1, x2, x3)  =  ap2B_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
ap2D_out_ggga(x1, x2, x3, x4)  =  ap2D_out_ggga(x4)
U10_ga(x1, x2, x3, x4, x5)  =  U10_ga(x5)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
PERME_IN_GA(x1, x2)  =  PERME_IN_GA(x1)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
AP2C_IN_GA(x1, x2)  =  AP2C_IN_GA(x1)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)
U6_GA(x1, x2, x3, x4)  =  U6_GA(x4)
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x5)
AP1A_IN_AAAG(x1, x2, x3, x4)  =  AP1A_IN_AAAG(x4)
U1_AAAG(x1, x2, x3, x4, x5, x6)  =  U1_AAAG(x1, x6)
U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x5)
U9_GA(x1, x2, x3, x4, x5)  =  U9_GA(x5)
AP2D_IN_GGGA(x1, x2, x3, x4)  =  AP2D_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4, x5)  =  U3_GGGA(x1, x5)
AP2B_IN_GGA(x1, x2, x3)  =  AP2B_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4, x5)  =  U2_GGA(x1, x5)
U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x5)
U11_GA(x1, x2, x3, x4, x5)  =  U11_GA(x5)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 12 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

AP2B_IN_GGA(cons(T109, T110), T111, cons(T109, X156)) → AP2B_IN_GGA(T110, T111, X156)

The TRS R consists of the following rules:

permE_in_ga(nil, nil) → permE_out_ga(nil, nil)
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U4_ga(T27, T28, T29, ap2C_in_ga(T28, X27))
ap2C_in_ga(T37, T37) → ap2C_out_ga(T37, T37)
U4_ga(T27, T28, T29, ap2C_out_ga(T28, X27)) → permE_out_ga(cons(T27, T28), cons(T27, T29))
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U5_ga(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_ga(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_ga(T27, T28, T29, permE_in_ga(T31, T29))
permE_in_ga(cons(T45, T46), cons(T47, T48)) → U7_ga(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
ap1A_in_aaag(nil, T68, T69, cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69, cons(T68, T69))
ap1A_in_aaag(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_aaag(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
U1_aaag(T77, X107, T79, X108, T78, ap1A_out_aaag(X107, T79, X108, T78)) → ap1A_out_aaag(cons(T77, X107), T79, X108, cons(T77, T78))
U7_ga(T45, T46, T47, T48, ap1A_out_aaag(X68, T47, X69, T46)) → permE_out_ga(cons(T45, T46), cons(T47, T48))
permE_in_ga(cons(T45, T46), cons(T47, T55)) → U8_ga(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
ap2D_in_ggga(T93, T94, T95, cons(T93, X134)) → U3_ggga(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
ap2B_in_gga(nil, T102, T102) → ap2B_out_gga(nil, T102, T102)
ap2B_in_gga(cons(T109, T110), T111, cons(T109, X156)) → U2_gga(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
U2_gga(T109, T110, T111, X156, ap2B_out_gga(T110, T111, X156)) → ap2B_out_gga(cons(T109, T110), T111, cons(T109, X156))
U3_ggga(T93, T94, T95, X134, ap2B_out_gga(T94, T95, X134)) → ap2D_out_ggga(T93, T94, T95, cons(T93, X134))
U9_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, X27)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_ga(T45, T46, T47, T55, permE_in_ga(T84, T55))
U11_ga(T45, T46, T47, T55, permE_out_ga(T84, T55)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U6_ga(T27, T28, T29, permE_out_ga(T31, T29)) → permE_out_ga(cons(T27, T28), cons(T27, T29))

The argument filtering Pi contains the following mapping:
permE_in_ga(x1, x2)  =  permE_in_ga(x1)
nil  =  nil
permE_out_ga(x1, x2)  =  permE_out_ga
cons(x1, x2)  =  cons(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
ap2C_in_ga(x1, x2)  =  ap2C_in_ga(x1)
ap2C_out_ga(x1, x2)  =  ap2C_out_ga(x2)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
ap1A_in_aaag(x1, x2, x3, x4)  =  ap1A_in_aaag(x4)
ap1A_out_aaag(x1, x2, x3, x4)  =  ap1A_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U8_ga(x1, x2, x3, x4, x5)  =  U8_ga(x1, x5)
U9_ga(x1, x2, x3, x4, x5)  =  U9_ga(x5)
ap2D_in_ggga(x1, x2, x3, x4)  =  ap2D_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x5)
ap2B_in_gga(x1, x2, x3)  =  ap2B_in_gga(x1, x2)
ap2B_out_gga(x1, x2, x3)  =  ap2B_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
ap2D_out_ggga(x1, x2, x3, x4)  =  ap2D_out_ggga(x4)
U10_ga(x1, x2, x3, x4, x5)  =  U10_ga(x5)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
AP2B_IN_GGA(x1, x2, x3)  =  AP2B_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

AP2B_IN_GGA(cons(T109, T110), T111, cons(T109, X156)) → AP2B_IN_GGA(T110, T111, X156)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
AP2B_IN_GGA(x1, x2, x3)  =  AP2B_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

AP2B_IN_GGA(cons(T109, T110), T111) → AP2B_IN_GGA(T110, T111)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • AP2B_IN_GGA(cons(T109, T110), T111) → AP2B_IN_GGA(T110, T111)
    The graph contains the following edges 1 > 1, 2 >= 2

(15) YES

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

AP1A_IN_AAAG(cons(T77, X107), T79, X108, cons(T77, T78)) → AP1A_IN_AAAG(X107, T79, X108, T78)

The TRS R consists of the following rules:

permE_in_ga(nil, nil) → permE_out_ga(nil, nil)
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U4_ga(T27, T28, T29, ap2C_in_ga(T28, X27))
ap2C_in_ga(T37, T37) → ap2C_out_ga(T37, T37)
U4_ga(T27, T28, T29, ap2C_out_ga(T28, X27)) → permE_out_ga(cons(T27, T28), cons(T27, T29))
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U5_ga(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_ga(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_ga(T27, T28, T29, permE_in_ga(T31, T29))
permE_in_ga(cons(T45, T46), cons(T47, T48)) → U7_ga(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
ap1A_in_aaag(nil, T68, T69, cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69, cons(T68, T69))
ap1A_in_aaag(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_aaag(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
U1_aaag(T77, X107, T79, X108, T78, ap1A_out_aaag(X107, T79, X108, T78)) → ap1A_out_aaag(cons(T77, X107), T79, X108, cons(T77, T78))
U7_ga(T45, T46, T47, T48, ap1A_out_aaag(X68, T47, X69, T46)) → permE_out_ga(cons(T45, T46), cons(T47, T48))
permE_in_ga(cons(T45, T46), cons(T47, T55)) → U8_ga(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
ap2D_in_ggga(T93, T94, T95, cons(T93, X134)) → U3_ggga(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
ap2B_in_gga(nil, T102, T102) → ap2B_out_gga(nil, T102, T102)
ap2B_in_gga(cons(T109, T110), T111, cons(T109, X156)) → U2_gga(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
U2_gga(T109, T110, T111, X156, ap2B_out_gga(T110, T111, X156)) → ap2B_out_gga(cons(T109, T110), T111, cons(T109, X156))
U3_ggga(T93, T94, T95, X134, ap2B_out_gga(T94, T95, X134)) → ap2D_out_ggga(T93, T94, T95, cons(T93, X134))
U9_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, X27)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_ga(T45, T46, T47, T55, permE_in_ga(T84, T55))
U11_ga(T45, T46, T47, T55, permE_out_ga(T84, T55)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U6_ga(T27, T28, T29, permE_out_ga(T31, T29)) → permE_out_ga(cons(T27, T28), cons(T27, T29))

The argument filtering Pi contains the following mapping:
permE_in_ga(x1, x2)  =  permE_in_ga(x1)
nil  =  nil
permE_out_ga(x1, x2)  =  permE_out_ga
cons(x1, x2)  =  cons(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
ap2C_in_ga(x1, x2)  =  ap2C_in_ga(x1)
ap2C_out_ga(x1, x2)  =  ap2C_out_ga(x2)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
ap1A_in_aaag(x1, x2, x3, x4)  =  ap1A_in_aaag(x4)
ap1A_out_aaag(x1, x2, x3, x4)  =  ap1A_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U8_ga(x1, x2, x3, x4, x5)  =  U8_ga(x1, x5)
U9_ga(x1, x2, x3, x4, x5)  =  U9_ga(x5)
ap2D_in_ggga(x1, x2, x3, x4)  =  ap2D_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x5)
ap2B_in_gga(x1, x2, x3)  =  ap2B_in_gga(x1, x2)
ap2B_out_gga(x1, x2, x3)  =  ap2B_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
ap2D_out_ggga(x1, x2, x3, x4)  =  ap2D_out_ggga(x4)
U10_ga(x1, x2, x3, x4, x5)  =  U10_ga(x5)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
AP1A_IN_AAAG(x1, x2, x3, x4)  =  AP1A_IN_AAAG(x4)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

AP1A_IN_AAAG(cons(T77, X107), T79, X108, cons(T77, T78)) → AP1A_IN_AAAG(X107, T79, X108, T78)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
AP1A_IN_AAAG(x1, x2, x3, x4)  =  AP1A_IN_AAAG(x4)

We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

AP1A_IN_AAAG(cons(T77, T78)) → AP1A_IN_AAAG(T78)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • AP1A_IN_AAAG(cons(T77, T78)) → AP1A_IN_AAAG(T78)
    The graph contains the following edges 1 > 1

(22) YES

(23) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PERME_IN_GA(cons(T27, T28), cons(T27, T29)) → U5_GA(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_GA(T27, T28, T29, ap2C_out_ga(T28, T31)) → PERME_IN_GA(T31, T29)
PERME_IN_GA(cons(T45, T46), cons(T47, T55)) → U8_GA(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_GA(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_GA(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_GA(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → PERME_IN_GA(T84, T55)

The TRS R consists of the following rules:

permE_in_ga(nil, nil) → permE_out_ga(nil, nil)
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U4_ga(T27, T28, T29, ap2C_in_ga(T28, X27))
ap2C_in_ga(T37, T37) → ap2C_out_ga(T37, T37)
U4_ga(T27, T28, T29, ap2C_out_ga(T28, X27)) → permE_out_ga(cons(T27, T28), cons(T27, T29))
permE_in_ga(cons(T27, T28), cons(T27, T29)) → U5_ga(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_ga(T27, T28, T29, ap2C_out_ga(T28, T31)) → U6_ga(T27, T28, T29, permE_in_ga(T31, T29))
permE_in_ga(cons(T45, T46), cons(T47, T48)) → U7_ga(T45, T46, T47, T48, ap1A_in_aaag(X68, T47, X69, T46))
ap1A_in_aaag(nil, T68, T69, cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69, cons(T68, T69))
ap1A_in_aaag(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_aaag(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
U1_aaag(T77, X107, T79, X108, T78, ap1A_out_aaag(X107, T79, X108, T78)) → ap1A_out_aaag(cons(T77, X107), T79, X108, cons(T77, T78))
U7_ga(T45, T46, T47, T48, ap1A_out_aaag(X68, T47, X69, T46)) → permE_out_ga(cons(T45, T46), cons(T47, T48))
permE_in_ga(cons(T45, T46), cons(T47, T55)) → U8_ga(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U9_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, X27))
ap2D_in_ggga(T93, T94, T95, cons(T93, X134)) → U3_ggga(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
ap2B_in_gga(nil, T102, T102) → ap2B_out_gga(nil, T102, T102)
ap2B_in_gga(cons(T109, T110), T111, cons(T109, X156)) → U2_gga(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
U2_gga(T109, T110, T111, X156, ap2B_out_gga(T110, T111, X156)) → ap2B_out_gga(cons(T109, T110), T111, cons(T109, X156))
U3_ggga(T93, T94, T95, X134, ap2B_out_gga(T94, T95, X134)) → ap2D_out_ggga(T93, T94, T95, cons(T93, X134))
U9_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, X27)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U8_ga(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_ga(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_ga(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → U11_ga(T45, T46, T47, T55, permE_in_ga(T84, T55))
U11_ga(T45, T46, T47, T55, permE_out_ga(T84, T55)) → permE_out_ga(cons(T45, T46), cons(T47, T55))
U6_ga(T27, T28, T29, permE_out_ga(T31, T29)) → permE_out_ga(cons(T27, T28), cons(T27, T29))

The argument filtering Pi contains the following mapping:
permE_in_ga(x1, x2)  =  permE_in_ga(x1)
nil  =  nil
permE_out_ga(x1, x2)  =  permE_out_ga
cons(x1, x2)  =  cons(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
ap2C_in_ga(x1, x2)  =  ap2C_in_ga(x1)
ap2C_out_ga(x1, x2)  =  ap2C_out_ga(x2)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
ap1A_in_aaag(x1, x2, x3, x4)  =  ap1A_in_aaag(x4)
ap1A_out_aaag(x1, x2, x3, x4)  =  ap1A_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U8_ga(x1, x2, x3, x4, x5)  =  U8_ga(x1, x5)
U9_ga(x1, x2, x3, x4, x5)  =  U9_ga(x5)
ap2D_in_ggga(x1, x2, x3, x4)  =  ap2D_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x5)
ap2B_in_gga(x1, x2, x3)  =  ap2B_in_gga(x1, x2)
ap2B_out_gga(x1, x2, x3)  =  ap2B_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
ap2D_out_ggga(x1, x2, x3, x4)  =  ap2D_out_ggga(x4)
U10_ga(x1, x2, x3, x4, x5)  =  U10_ga(x5)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
PERME_IN_GA(x1, x2)  =  PERME_IN_GA(x1)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)
U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x5)
U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x5)

We have to consider all (P,R,Pi)-chains

(24) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(25) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PERME_IN_GA(cons(T27, T28), cons(T27, T29)) → U5_GA(T27, T28, T29, ap2C_in_ga(T28, T31))
U5_GA(T27, T28, T29, ap2C_out_ga(T28, T31)) → PERME_IN_GA(T31, T29)
PERME_IN_GA(cons(T45, T46), cons(T47, T55)) → U8_GA(T45, T46, T47, T55, ap1A_in_aaag(T53, T47, T54, T46))
U8_GA(T45, T46, T47, T55, ap1A_out_aaag(T53, T47, T54, T46)) → U10_GA(T45, T46, T47, T55, ap2D_in_ggga(T45, T53, T54, T84))
U10_GA(T45, T46, T47, T55, ap2D_out_ggga(T45, T53, T54, T84)) → PERME_IN_GA(T84, T55)

The TRS R consists of the following rules:

ap2C_in_ga(T37, T37) → ap2C_out_ga(T37, T37)
ap1A_in_aaag(nil, T68, T69, cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69, cons(T68, T69))
ap1A_in_aaag(cons(T77, X107), T79, X108, cons(T77, T78)) → U1_aaag(T77, X107, T79, X108, T78, ap1A_in_aaag(X107, T79, X108, T78))
ap2D_in_ggga(T93, T94, T95, cons(T93, X134)) → U3_ggga(T93, T94, T95, X134, ap2B_in_gga(T94, T95, X134))
U1_aaag(T77, X107, T79, X108, T78, ap1A_out_aaag(X107, T79, X108, T78)) → ap1A_out_aaag(cons(T77, X107), T79, X108, cons(T77, T78))
U3_ggga(T93, T94, T95, X134, ap2B_out_gga(T94, T95, X134)) → ap2D_out_ggga(T93, T94, T95, cons(T93, X134))
ap2B_in_gga(nil, T102, T102) → ap2B_out_gga(nil, T102, T102)
ap2B_in_gga(cons(T109, T110), T111, cons(T109, X156)) → U2_gga(T109, T110, T111, X156, ap2B_in_gga(T110, T111, X156))
U2_gga(T109, T110, T111, X156, ap2B_out_gga(T110, T111, X156)) → ap2B_out_gga(cons(T109, T110), T111, cons(T109, X156))

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
ap2C_in_ga(x1, x2)  =  ap2C_in_ga(x1)
ap2C_out_ga(x1, x2)  =  ap2C_out_ga(x2)
ap1A_in_aaag(x1, x2, x3, x4)  =  ap1A_in_aaag(x4)
ap1A_out_aaag(x1, x2, x3, x4)  =  ap1A_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
ap2D_in_ggga(x1, x2, x3, x4)  =  ap2D_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x5)
ap2B_in_gga(x1, x2, x3)  =  ap2B_in_gga(x1, x2)
ap2B_out_gga(x1, x2, x3)  =  ap2B_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
ap2D_out_ggga(x1, x2, x3, x4)  =  ap2D_out_ggga(x4)
PERME_IN_GA(x1, x2)  =  PERME_IN_GA(x1)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)
U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x5)
U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x5)

We have to consider all (P,R,Pi)-chains

(26) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(27) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PERME_IN_GA(cons(T27, T28)) → U5_GA(ap2C_in_ga(T28))
U5_GA(ap2C_out_ga(T31)) → PERME_IN_GA(T31)
PERME_IN_GA(cons(T45, T46)) → U8_GA(T45, ap1A_in_aaag(T46))
U8_GA(T45, ap1A_out_aaag(T53, T47, T54)) → U10_GA(ap2D_in_ggga(T45, T53, T54))
U10_GA(ap2D_out_ggga(T84)) → PERME_IN_GA(T84)

The TRS R consists of the following rules:

ap2C_in_ga(T37) → ap2C_out_ga(T37)
ap1A_in_aaag(cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69)
ap1A_in_aaag(cons(T77, T78)) → U1_aaag(T77, ap1A_in_aaag(T78))
ap2D_in_ggga(T93, T94, T95) → U3_ggga(T93, ap2B_in_gga(T94, T95))
U1_aaag(T77, ap1A_out_aaag(X107, T79, X108)) → ap1A_out_aaag(cons(T77, X107), T79, X108)
U3_ggga(T93, ap2B_out_gga(X134)) → ap2D_out_ggga(cons(T93, X134))
ap2B_in_gga(nil, T102) → ap2B_out_gga(T102)
ap2B_in_gga(cons(T109, T110), T111) → U2_gga(T109, ap2B_in_gga(T110, T111))
U2_gga(T109, ap2B_out_gga(X156)) → ap2B_out_gga(cons(T109, X156))

The set Q consists of the following terms:

ap2C_in_ga(x0)
ap1A_in_aaag(x0)
ap2D_in_ggga(x0, x1, x2)
U1_aaag(x0, x1)
U3_ggga(x0, x1)
ap2B_in_gga(x0, x1)
U2_gga(x0, x1)

We have to consider all (P,Q,R)-chains.

(28) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

PERME_IN_GA(cons(T27, T28)) → U5_GA(ap2C_in_ga(T28))
U5_GA(ap2C_out_ga(T31)) → PERME_IN_GA(T31)
PERME_IN_GA(cons(T45, T46)) → U8_GA(T45, ap1A_in_aaag(T46))
U8_GA(T45, ap1A_out_aaag(T53, T47, T54)) → U10_GA(ap2D_in_ggga(T45, T53, T54))
U10_GA(ap2D_out_ggga(T84)) → PERME_IN_GA(T84)

Strictly oriented rules of the TRS R:

ap2C_in_ga(T37) → ap2C_out_ga(T37)
ap1A_in_aaag(cons(T68, T69)) → ap1A_out_aaag(nil, T68, T69)
ap1A_in_aaag(cons(T77, T78)) → U1_aaag(T77, ap1A_in_aaag(T78))
ap2D_in_ggga(T93, T94, T95) → U3_ggga(T93, ap2B_in_gga(T94, T95))
U1_aaag(T77, ap1A_out_aaag(X107, T79, X108)) → ap1A_out_aaag(cons(T77, X107), T79, X108)
U3_ggga(T93, ap2B_out_gga(X134)) → ap2D_out_ggga(cons(T93, X134))
ap2B_in_gga(nil, T102) → ap2B_out_gga(T102)
ap2B_in_gga(cons(T109, T110), T111) → U2_gga(T109, ap2B_in_gga(T110, T111))
U2_gga(T109, ap2B_out_gga(X156)) → ap2B_out_gga(cons(T109, X156))

Used ordering: Knuth-Bendix order [KBO] with precedence:
U10GA1 > ap2Dinggga3 > ap1Ainaaag1 > ap2Coutga1 > cons2 > U5GA1 > PERMEINGA1 > U1aaag2 > U8GA2 > ap2Bingga2 > U2gga2 > U3ggga2 > ap2Doutggga1 > ap2Boutgga1 > nil > ap1Aoutaaag3 > ap2Cinga1

and weight map:

nil=4
ap2C_in_ga_1=3
ap2C_out_ga_1=2
ap1A_in_aaag_1=3
ap2B_out_gga_1=4
ap2D_out_ggga_1=3
PERME_IN_GA_1=3
U5_GA_1=1
U10_GA_1=1
cons_2=1
ap1A_out_aaag_3=0
U1_aaag_2=1
ap2D_in_ggga_3=0
U3_ggga_2=0
ap2B_in_gga_2=0
U2_gga_2=1
U8_GA_2=1

The variable weight is 1

(29) Obligation:

Q DP problem:
P is empty.
R is empty.
The set Q consists of the following terms:

ap2C_in_ga(x0)
ap1A_in_aaag(x0)
ap2D_in_ggga(x0, x1, x2)
U1_aaag(x0, x1)
U3_ggga(x0, x1)
ap2B_in_gga(x0, x1)
U2_gga(x0, x1)

We have to consider all (P,Q,R)-chains.

(30) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(31) YES